[g]cc [flags] files -lsipp -lm [ libraries ]
Each object primitive has a last argument that describes what kind of texture coordinates should be assigned to the surface of the object. This texture parameter should be one of: NATURAL, CYLINDRICAL, SPHERICAL or WORD. See the user manual for a detailed description of the meaning of the different values.
sipp_torus() creates a torus centered about the origin and with the z-axis pointing up through the ring. NATURAL texture mapping is a two dimensional mapping with the x coordinate going around the "small" circle and the y coordinate going around the "large" circle.
sipp_cone() creates a, possibly truncated, cone centered about the origin and with the z-axis along the cones main axis. NATURAL texture mapping is CYLINDRICAL.
sipp_cylinder() creates a cylinder centered about the origin and with the z-axis along the cylinders main axis. NATURAL texture mapping is CYLINDRICAL.
sipp_ellipsoid() creates a ellipsoid centered about the origin. NATURAL texture mapping is SPHERICAL.
sipp_sphere() creates a sphere centered about the origin. NATURAL texture mapping is SPHERICAL.
sipp_prism() creates a prism defined by the polygon in points. Only the x and y values are used and the prism will ascend and descend equally far (length / 2.0) from the x-y plane along the z axis. NATURAL texture mapping is similar to CYLINDRICAL but the x coordinate is not taken from projection on a cylinder but is evenly distributed around the perimeter. An odd thing in all the 2D mappings for the prism is that the top face will have texture coordinates (0.0, 1.0) while the bottom will get (0.0, 0.0).
sipp_block() creates a rectangular block with the size defined by x_size, z_size and z_size. The block is centered about the origin. NATURAL texture mapping is similar to CYLINDRICAL but the x coordinate is not taken from projection on a cylinder but is evenly distributed around the perimeter. An odd thing in all the 2D mappings for the block is that the top face will have texture coordinates (0.0, 1.0) while the bottom will get (0.0, 0.0).
sipp_cube() creates a cube with the side of length side. The cube is centered about the origin. NATURAL texture mapping is similar to CYLINDRICAL but the x coordinate is not taken from projection on a cylinder but is evenly distributed around the perimeter. An odd thing in all the 2D mappings for the cube is that the top face will have texture coordinates (0.0, 1.0) while the bottom will get (0.0, 0.0).
This function creates one or more bezier patches. All created patches in a call will belong to the same surface. The texture coordinates are a bit special for the bezier patches. CYLINDRICAL and SPHERICAL coordinates are not applicable, if they are specified, SIPP will use NATURAL anyway. The NATURAL mapping is a two dimensional mapping using the surface parameters u and v. Note that these parameters range from 0 to 1 within each patch!
This function creates a surface by rotating one or more bezier curves about the world z-axis. The texture coordinates are a bit special for these surfaces. SPHERICAL and CYLINDRICAL mappings are not applicable, and NATURAL mapping will apply to the peace of surface created by each bezier curve separately. The NATURAL mapping uses the curve parameter u along each curve as x coordinate and goes from 0 to 1 around the perimeter of the rotational surface on the other axis
sipp_bezier_file() reads a file containing descriptions of a set of bezier patches or bezier curves. See the user manual for a detailed description of the format of the definition file. Texture coordinates are assigned in the same way as in sipp_bezier_patch() and sipp_bezier_rotcurve().